<?php
// if(empty($_POST['url'])){
//     exit('error');
// }
include "../phpqrcode.php";

$errorCorrectionLevel = 'M';//容错级别
$matrixPointSize = 10;//生成图片大小
//生成二维码图片
//QRcode::png($_POST['url'], '../images/'.$POST['name'].'.png', $errorCorrectionLevel, $matrixPointSize, 2);
QRcode::png($_POST['url'], '../images/'.$_POST['name'].'.png', $errorCorrectionLevel, $matrixPointSize, 2);
if(is_file('../images/'.$_POST['name'].'.png')){
    echo 1;
}else{
    echo '创建失败！';
}
